package com.tm.jacoco;
import com.tm.test.ExampleTest;

import java.util.Locale;

@SuppressWarnings("all")
public class MessageBuilder {
    public String getMessage(String name) {
        StringBuilder result = new StringBuilder();
        if (name == null || name.trim().isEmpty()) {
            result.append("empty");
        } else {
            result.append("Hello ").append(name);
        }
        return result.toString();
    }

    public String case1(int num) {
        String str = ExampleTest.caseNum(num);
        if ("ok".equals(str)) {
            return str.toUpperCase(Locale.ROOT);
        } else if (str.contains("ze")) {
            return "零";
        }
        return str;
    }
}